<!DOCTYPE html>
<html class="loginHtml">
<head>
    <meta charset="utf-8">
    <title>登录--协会后台管理2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="icon" href="${ctxPath}/static/manage/favicon.ico">
    <link rel="stylesheet" href="${ctxPath}/static/manage/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctxPath}/static/manage/css/public.css" media="all"/>
</head>

<body class="loginBody">
<form class="layui-form" action="/loginValid" method="post">
    <div class="login_face"><img src="${ctxPath}/static/manage/images/logo.jpg" class="userAvatar"></div>
    <div class="layui-form-item input-item">
        <label for="userName">用户名</label>
        <input type="text" placeholder="请输入用户名" id="userName" name="userName" class="layui-input" lay-verify="required">
    </div>
    <div class="layui-form-item input-item">
        <label for="password">密码</label>
        <input type="password" placeholder="请输入密码" id="password" name="password" class="layui-input"
               lay-verify="required">
    </div>
    <div class="layui-form-item input-item" id="imgCode">
        <label for="code">验证码</label>
        <input type="text" placeholder="请输入验证码" id="code" name="kaptcha" class="layui-input" lay-verify="required">
        <img src="/kaptcha" id="kaptcha"/>
    </div>
    <div class="layui-form-item">
        <button class="layui-btn layui-inline" lay-filter="login" lay-submit>登录</button>
        <input type="button" class="layui-btn layui-inline" id="register" value="注册"/>
    </div>
    <div class="layui-form-item layui-row">
        <div class="beg-pull-left">
            <h2 style="color: red;">${tips!}</h2>
        </div>
    </div>
</form>
</body>
</html>
<script src="${ctxPath}/static/manage/js/jquery.js"></script>
<script type="text/javascript" src="${ctxPath}/static/manage/layui/layui.js"></script>
<script type="text/javascript" src="${ctxPath}/static/manage/js/login.js"></script>
<script type="text/javascript">
    layui.use(['form', 'layer'], function () {
        var $ = layui.$, layer = layui.layer;
        //发送跳转到注册页面请求
        $('#register').on('click', function () {
            layer.open({
                title: "注册用户",
                type: 2,
                fix: false, //不固定
                maxmin: true,
                area: ['800px', '500px'],
                content: "/register"
            });
        });
    });
</script>